<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Product/PackageProducts.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>
<script>
import extend from '@/extension/Product/PackageProducts.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '套票列表',
        name: 'PackageProducts',
        url: '/PackageProducts/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        timeContainer: [],
        name: '',
        pics: [],
        type: [],
        typename: '套票',
        code: '',
        costprice: '',
        effectiveStartDate: '',
        effectiveEndDate: '',
        unit: '',
        mainLabel: '',
        auxiliaryLabel: '',
        pmsRoomCode: '',
        hotel_ID: '',
        picid: [],
        isPackage: '',
        txtid: '',
        deposit: '',
        bookingNotice: '',
        rulesOfUse: '',
        description: '',
        creator: '',
        createID: '',
        createDate: '',
        modifier: '',
        modifyID: '',
        modifyDate: '',
        merchantCode: '',
        merchantName: '',
        teachingGrade: '',
        teachingTime: '',
      },
      editFormOptions: [
        [
          { title: '名称', required: true, field: 'name', colSize: 4, type: 'text' },
          { title: '产品类型名称', required: true, colSize: 4, field: 'type', dataKey: 'type_taopiao', data: [], type: 'cascader' },
          { title: '产品类型名称', field: 'typename', colSize: 4, disabled: true, hidden: true },
        ],
        [
          { title: '有效时间', required: true, field: 'timeContainer', colSize: 6, type: 'datetime', range: true },
          { title: '成本价', required: true, field: 'costprice', colSize: 3, type: 'decimal' },
          { title: '有效开始时间', field: 'effectiveStartDate', colSize: 3, type: 'datetime', hidden: true },
          { title: '有效结束时间', field: 'effectiveEndDate', colSize: 3, type: 'datetime', hidden: true },
          { dataKey: 'unit', data: [], title: '单位', required: true, field: 'unit', colSize: 3, type: 'select' },
        ],
        [
          { dataKey: 'Label', data: [], title: '主标签', field: 'mainLabel', colSize: 6, type: 'select' },
          { dataKey: 'Label', data: [], title: '辅助标签', field: 'auxiliaryLabel', colSize: 6, type: 'selectList' },
        ],
        [
          { title: '封面图', maxSize: 1, field: 'picid', colSize: 3, type: 'imgupgrade', maxFile: 1, multiple: true },
          { title: '轮播图', maxSize: 1, field: 'pics', colSize: 6, type: 'imgupgrade', maxFile: 5, multiple: true },
        ],
        [
          { title: '押金', field: 'deposit', colSize: 3, type: 'decimal', min: 0 },
          { dataKey: 'enable', data: [], title: '是否套票项', field: 'isPackage', colSize: 3, type: 'switch' },
          { dataKey: 'mall_test', data: [], title: '详情介绍', required: true, field: 'txtid', colSize: 3, type: 'select' },
          { title: '预订须知', field: 'bookingNotice', colSize: 3, type: 'select', dataKey: 'mall_book', data: [] },
        ],
        [{ title: '使用规则', field: 'rulesOfUse', colSize: 12, type: 'textarea' }],
        [{ title: '描述', required: true, field: 'description', colSize: 12, type: 'textarea' }],
      ],
      searchFormFields: { goodcode: '', effectiveState: '', name: '', type: '', createDate: '', mainLabel: '', unit: '', description: '' },
      searchFormOptions: [
        [
          { field: 'name', title: '产品名称', type: 'like' },
          { field: 'type', type: 'select', title: '产品类型', hidden: true, dataKey: 'tree_protype', data: [] },
          { field: 'createDate', title: '创建时间', type: 'date' },
          { field: 'mainLabel', title: '主标签', type: 'select', dataKey: 'Label', data: [] },
        ],
        [
          { field: 'goodcode', title: '商品编码', type: 'like' },
          { dataKey: 'ProductValidityStatus', data: [], title: '是否有效', field: 'effectiveState', type: 'select' },
          { field: 'unit', title: '单位', type: 'select', dataKey: 'unit', data: [] },
          { field: 'description', title: '描述', type: 'like' },
        ],
      ],
      columns: [
        { field: 'name', title: '产品名称', type: 'string', width: 120, require: true, align: 'left', sortable: true, show: true },
        { field: 'code', title: '产品编码', type: 'string', width: 120, require: true, align: 'left', show: true },
        {
          field: 'type',
          title: '产品类型',
          type: 'string',
          bind: { key: 'pro_type', data: [] },
          width: 120,
          require: true,
          align: 'left',
          hidden: true,
        },
        //    {field:'supplierCode',title:'供应商编码',type:'string',width:120,align:'left',hidden:true},
        { field: 'typename', title: '产品类型', type: 'string', bind: { key: 'enable', data: [] }, width: 120, align: 'left' },
        //{field:'name2',title:'简称',type:'string',width:80,require:true,align:'left'},
        { field: 'costprice', title: '成本价', type: 'decimal', width: 80, align: 'left' },
        { field: 'deposit', title: '押金', type: 'decimal', width: 80, align: 'left' },
        { field: 'pmsRoomCode', title: 'pms房价码', type: 'string', hidden: true, width: 110, align: 'left' },
        { field: 'hotel_ID', title: '酒店名称', type: 'string', hidden: true, bind: { key: 'Hotels', data: [] }, width: 160, align: 'left' },
        { field: 'unit', title: '单位', type: 'int', bind: { key: 'unit', data: [] }, width: 60, align: 'left', hidden: true },
        { field: 'mainLabel', title: '主标签', type: 'string', bind: { key: 'Label', data: [] }, width: 110, align: 'left', hidden: true },
        { field: 'unitname', title: '单位名称', type: 'string', width: 80, hidden: true, align: 'left' },
        { field: 'mainLabelname', title: '主标签名称', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'auxiliaryLabelname', title: '辅助标签名称', type: 'string', width: 260, hidden: true, align: 'left' },
        { field: 'picid', title: '封面图', type: 'imgupgrade', width: 80, align: 'left' },
        { field: 'isPackage', title: '是否套票项', type: 'sbyte', bind: { key: 'enable', data: [] }, width: 100, hidden: true, align: 'left' },
        { field: 'txtidname', title: '详情介绍', type: 'string', width: 220, align: 'left' },
        //{field:'txtid',title:'图文介绍',type:'string',bind:{ key:'mall_test',data:[]},width:160,align:'left'},
        { field: 'bookingNoticeName', title: '预订须知', type: 'string', width: 80, align: 'left', show: true },
        { field: 'rulesOfUse', title: '使用规则', type: 'string', width: 100, hidden: true, align: 'left', show: true },
        { field: 'description', title: '描述', type: 'string', width: 100, align: 'left', show: true },
        //    {field:'supplierName',title:'供应商名称',type:'string',width:180,align:'left'},
        { field: 'auxiliaryLabel', title: '辅助标签', type: 'string', width: 260, align: 'left', hidden: true },
        { field: 'modifyID', title: '修改人ID', type: 'int', width: 120, hidden: true, align: 'left' },
        { field: 'spare10', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'spare11', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'spare12', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'spare13', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'spare15', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'spare4', title: 'spare4', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'spare7', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'spare8', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'spare9', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'txtidname', title: '富文本名称', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'spare14', title: '扩展字段1', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'effectiveStartDate', title: '开始时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        { field: 'effectiveEndDate', title: '结束时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        { field: 'creator', title: '创建人', type: 'string', width: 100, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        { field: 'createID', title: '创建人ID', type: 'int', width: 120, hidden: true, align: 'left' },
        { field: 'modifier', title: '修改人', type: 'string', width: 100, align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        { field: 'merchantCode', title: '商户编码', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'carouselCode', title: '轮播图code', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'merchantName', title: '商户名称', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'hotelName', title: '酒店名称', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'id', title: '主键', type: 'string', width: 120, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'isAvailable', title: '是否可用', type: 'sbyte', width: 120, hidden: true, align: 'left' },
        { field: 'isDelete', title: '是否删除', type: 'int', width: 120, hidden: true, require: true, align: 'left' },
      ],
      detail: {
        cnName: '',
      },
    }
  },
}
export default vueParam
</script>